home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Borland / Borland C++ V5.02 / GDIDEMO.PAK / LINE.H < prev    next >
C/C++ Source or Header  |  1997-05-06  |  1KB  |  42 lines

  1. //----------------------------------------------------------------------------
  2. // ObjectWindows
  3. // Copyright (c) 1991, 1995 by Borland International, All Rights Reserved
  4. //
  5. //   MoveToLineTo demo window header
  6. //----------------------------------------------------------------------------
  7. #if !defined(LINE_H)
  8. #define LINE_H
  9.  
  10. #include "demobase.h"
  11.  
  12. // MoveToLineTo demo constants
  13. const int  MaxPoints    = 15;  // Number of points to be drawn 
  14. const int  IconicPoints = 6;   // Number of points to draw when iconized
  15.  
  16. struct TRPoint {
  17.   float X, Y;
  18. };
  19.  
  20. class TMoveToLineToWindow : public TBaseDemoWindow {
  21.   public:
  22.     TMoveToLineToWindow();
  23.     
  24.     void TimerTick();
  25.     void Paint(TDC& dc, bool, TRect&);
  26.  
  27.   protected:
  28.     void EvSize(uint, TSize& Size);
  29.   
  30.   private:
  31.     TRPoint     Points[MaxPoints];
  32.     float       Rotation;     // in radians
  33.     int         PointCount;
  34.     bool        Iconized;
  35.     void        RotatePoints();
  36.  
  37.   DECLARE_CASTABLE;
  38.   DECLARE_RESPONSE_TABLE(TMoveToLineToWindow);
  39. };
  40.  
  41. #endif  //  LINE_H
  42.